/*
	Switching mechanism;
	swState :
		0 ... no switch;
		1 ... MCT(iEC) -> BFP(iPC)
		2 ... BFP(iPC) -> MCT(iEC)
*/
int swState 	= 0;
int swTime	= 200;

#define INDMAX 100000

#define SPECIES 23
#define REACTIONS 47

int species[SPECIES];
int reactants[REACTIONS][SPECIES]	= {0};
int products[REACTIONS][SPECIES]	= {0};
int dif[REACTIONS][SPECIES]			= {0};
float w[REACTIONS]					= {0};
float c[REACTIONS]					= {0};



/*Parameters*/

/*
float g1 	= 0.1;
float a_1 	= 0.3;
float a1 	= 0.9;
float k1 	= 0.8;
float b1	= 0.001;
float d1	= 0.01;

float g1 	= ELEMENT[BLINDEX].vector[0];
float a_1 	= ELEMENT[BLINDEX].vector[1];
float a1 	= ELEMENT[BLINDEX].vector[2];
float k1 	= ELEMENT[BLINDEX].vector[3];
float b1	= ELEMENT[BLINDEX].vector[4];
float d1	= ELEMENT[BLINDEX].vector[5];
*/

/*Species*/
#define BFP		0
#define mCITRINE	1
#define P1		2
#define P1_TALA_KRAB	3
#define P1_TALA_VP16	4	
#define TALA_KRAB	5
#define TALA_VP16	6
#define TALB_KRAB	7
#define TALB_VP16	8
#define P2		9
#define P2_TALB_KRAB	10
#define P2_TALB_VP16	11
#define P3		12
#define P3_PIP_KRAB	13
#define PIP_KRAB	14
#define P4		15
#define P4_E_KRAB	16
#define E_KRAB		17
#define P5		18
#define iPC		19
#define iEC		20
#define iPC_PIP_KRAB	21
#define iEC_E_KRAB	22

	

species[BFP] 			= 0;
species[mCITRINE] 		= 0;
species[P1] 			= 100;
species[P1_TALA_KRAB] 		= 0;
species[P1_TALA_VP16]		= 0;
species[TALA_KRAB] 		= 0;
species[TALA_VP16] 		= 0;
species[TALB_KRAB] 		= 0;
species[TALB_VP16] 		= 0;
species[P2] 			= 100;
species[P2_TALB_KRAB] 		= 0;
species[P2_TALB_VP16] 		= 0;
species[P3] 			= 300;
species[P3_PIP_KRAB]		= 0;
species[PIP_KRAB] 		= 0;
species[P4] 			= 300;	
species[P4_E_KRAB] 		= 0;
species[E_KRAB] 		= 0;
species[P5] 			= 500;
species[iPC] 			= 0;
species[iEC] 			= INDMAX;
species[iPC_PIP_KRAB]		= 0;
species[iEC_E_KRAB] 		= 0;

	
/*	
species[BFP] 			= 1;
species[mCITRINE] 		= 1;
species[P1] 			= 100;
species[P1_TALA_KRAB] 		= 1;
species[P1_TALA_VP16]		= 1;
species[TALA_KRAB] 		= 1;
species[TALA_VP16] 		= 1;
species[TALB_KRAB] 		= 1;
species[TALB_VP16] 		= 1;
species[P2] 			= 100;
species[P2_TALB_KRAB] 		= 1;
species[P2_TALB_VP16] 		= 1;
species[P3] 			= 300;
species[P3_PIP_KRAB]		= 1;
species[PIP_KRAB] 		= 1;
species[P4] 			= 300;	
species[P4_E_KRAB] 		= 1;
species[E_KRAB] 		= 1;
species[P5] 			= 500;
species[iPC] 			= 1;
species[iEC] 			= 1;
species[iPC_PIP_KRAB]		= 1;
species[iEC_E_KRAB] 		= 1;
*/

/*tau-leaping aux*/
//float fjj[REACTIONS][REACTIONS] = { 0 };
	
/*Reactions*/	


/*P1*/
		
c[0] = k1;
reactants[0][P1_TALA_VP16] = 1;
//--------------------------//
products[0][P1_TALA_VP16] = 1;
products[0][TALB_KRAB] = 1;
products[0][TALA_VP16] = 1;
products[0][BFP] = 1;
#define W0 w[0] = c[0] * species[P1_TALA_VP16];
//--------------------------//
//fjj[0][3] = c[0]*dif[3][P1_TALA_VP16];
//fjj[0][4] = c[0]*dif[4][P1_TALA_VP16];
//fjj[0][5] = c[0]*dif[5][P1_TALA_VP16];
//fjj[0][6] = c[0]*dif[6][P1_TALA_VP16];

        
c[1] = b1;
reactants[1][P1] = 1;
//--------------------------//
products[1][P1] = 1;
products[1][TALB_KRAB] = 1;
products[1][TALA_VP16] = 1;
products[1][BFP] = 1;
#define W1 w[1] = c[1] * species[P1];
//fjj[1][3] = c[1]*dif[3][P1];
//fjj[1][4] = c[1]*dif[4][P1];
//fjj[1][5] = c[1]*dif[5][P1];
//fjj[1][6] = c[1]*dif[6][P1];
//fjj[1][7] = c[1]*dif[7][P1];
//fjj[1][8] = c[1]*dif[8][P1];
//fjj[1][9] = c[1]*dif[9][P1];

	
c[2] = 0.01*b1;
reactants[2][P1_TALA_KRAB] = 1;
//--------------------------//
products[2][P1_TALA_KRAB] = 1;
products[2][TALB_KRAB] = 1;
products[2][TALA_VP16] = 1;
products[2][BFP] = 1;
#define W2 w[2] = c[2] * species[P1_TALA_KRAB];
//fjj[2][6] = c[2]*dif[6][P1_TALA_KRAB];
//fjj[2][7] = c[2]*dif[7][P1_TALA_KRAB];
//fjj[2][8] = c[2]*dif[8][P1_TALA_KRAB];
//fjj[2][9] = c[2]*dif[9][P1_TALA_KRAB];


c[3] = a1;
reactants[3][P1] = 1;
reactants[3][TALA_VP16] = 1;
//--------------------------//
products[3][P1_TALA_VP16] = 1;
#define W3 w[3] = c[3] * species[P1]*species[TALA_VP16];
//fjj[3][3] = c[3]*species[TALA_VP16]*dif[3][P1] + c[3]*species[P1]*dif[3][TALA_VP16];
//fjj[3][4] = c[3]*species[TALA_VP16]*dif[4][P1] + c[3]*species[P1]*dif[4][TALA_VP16];
//fjj[3][5] = c[3]*species[TALA_VP16]*dif[5][P1] + c[3]*species[P1]*dif[5][TALA_VP16];
//fjj[3][7] = c[3]*species[TALA_VP16]*dif[7][P1] + c[3]*species[P1]*dif[7][TALA_VP16];
//fjj[3][8] = c[3]*species[TALA_VP16]*dif[8][P1] + c[3]*species[P1]*dif[8][TALA_VP16];
//fjj[3][9] = c[3]*species[TALA_VP16]*dif[9][P1] + c[3]*species[P1]*dif[9][TALA_VP16];
//fjj[3][0] = c[3]*species[TALA_VP16]*dif[0][P1] + c[3]*species[P1]*dif[0][TALA_VP16];
//fjj[3][1] = c[3]*species[TALA_VP16]*dif[1][P1] + c[3]*species[P1]*dif[1][TALA_VP16];
//fjj[3][2] = c[3]*species[TALA_VP16]*dif[2][P1] + c[3]*species[P1]*dif[2][TALA_VP16];
//fjj[3][20] = c[3]*species[TALA_VP16]*dif[20][P1] + c[3]*species[P1]*dif[20][TALA_VP16];
//fjj[3][21] = c[3]*species[TALA_VP16]*dif[21][P1] + c[3]*species[P1]*dif[21][TALA_VP16];
//fjj[3][40] = c[3]*species[TALA_VP16]*dif[40][P1] + c[3]*species[P1]*dif[40][TALA_VP16];


c[4] = a_1;
reactants[4][P1_TALA_VP16] = 1;
//--------------------------//
products[4][P1] = 1;
products[4][TALA_VP16] = 1;
#define W4 w[4] = c[4] * species[P1_TALA_VP16];
//fjj[4][3] = c[4] * dif[3][P1_TALA_VP16];
//fjj[4][4] = c[4] * dif[4][P1_TALA_VP16];
//fjj[4][5] = c[4] * dif[5][P1_TALA_VP16];
//fjj[4][6] = c[4] * dif[6][P1_TALA_VP16];

c[5] = d1;
reactants[5][P1_TALA_VP16] = 1;
//--------------------------//
products[5][P1] = 1;
#define W5 w[5] = c[5] * species[P1_TALA_VP16];
//fjj[5][3] = c[5] * dif[3][P1_TALA_VP16];
//fjj[5][4] = c[5] * dif[4][P1_TALA_VP16];
//fjj[5][5] = c[5] * dif[5][P1_TALA_VP16];
//fjj[5][6] = c[5] * dif[6][P1_TALA_VP16];

c[6] = a1;
reactants[6][P1_TALA_VP16] = 1;
reactants[6][TALA_KRAB] = 1;
//--------------------------//
products[6][P1_TALA_KRAB] = 1;
#define W6 w[6] = c[6] * species[P1_TALA_VP16] * species[TALA_KRAB];
//fjj[6][3] = c[6] * species[TALA_KRAB] * dif[3][P1_TALA_VP16] + c[6] * species[P1_TALA_VP16] * dif[3][TALA_KRAB];
//fjj[6][4] = c[6] * species[TALA_KRAB] * dif[4][P1_TALA_VP16] + c[6] * species[P1_TALA_VP16] * dif[4][TALA_KRAB];
//fjj[6][5] = c[6] * species[TALA_KRAB] * dif[5][P1_TALA_VP16] + c[6] * species[P1_TALA_VP16] * dif[5][TALA_KRAB];
//fjj[6][6] = c[6] * species[TALA_KRAB] * dif[6][P1_TALA_VP16] + c[6] * species[P1_TALA_VP16] * dif[6][TALA_KRAB];
//fjj[6][7] = c[6] * species[TALA_KRAB] * dif[7][P1_TALA_VP16] + c[6] * species[P1_TALA_VP16] * dif[7][TALA_KRAB];
//fjj[6][8] = c[6] * species[TALA_KRAB] * dif[8][P1_TALA_VP16] + c[6] * species[P1_TALA_VP16] * dif[8][TALA_KRAB];
//fjj[6][10] = c[6] * species[TALA_KRAB] * dif[10][P1_TALA_VP16] + c[6] * species[P1_TALA_VP16] * dif[10][TALA_KRAB];
//fjj[6][11] = c[6] * species[TALA_KRAB] * dif[11][P1_TALA_VP16] + c[6] * species[P1_TALA_VP16] * dif[11][TALA_KRAB];
//fjj[6][12] = c[6] * species[TALA_KRAB] * dif[12][P1_TALA_VP16] + c[6] * species[P1_TALA_VP16] * dif[12][TALA_KRAB];
//fjj[6][26] = c[6] * species[TALA_KRAB] * dif[26][P1_TALA_VP16] + c[6] * species[P1_TALA_VP16] * dif[26][TALA_KRAB];
//fjj[6][25] = c[6] * species[TALA_KRAB] * dif[25][P1_TALA_VP16] + c[6] * species[P1_TALA_VP16] * dif[25][TALA_KRAB];
//fjj[6][39] = c[6] * species[TALA_KRAB] * dif[39][P1_TALA_VP16] + c[6] * species[P1_TALA_VP16] * dif[39][TALA_KRAB];

c[7] = a1;
reactants[7][P1] = 1;
reactants[7][TALA_KRAB] = 1;
//--------------------------//
products[7][P1_TALA_KRAB] = 1;
#define W7 w[7] = c[7] * species[P1] * species[TALA_KRAB];
//fjj[7][3] = c[7] * species[TALA_KRAB] * dif[3][P1] + c[7] * species[P1] * dif[3][TALA_KRAB];
//fjj[7][4] = c[7] * species[TALA_KRAB] * dif[4][P1] + c[7] * species[P1] * dif[4][TALA_KRAB];
//fjj[7][5] = c[7] * species[TALA_KRAB] * dif[5][P1] + c[7] * species[P1] * dif[5][TALA_KRAB];
//fjj[7][7] = c[7] * species[TALA_KRAB] * dif[7][P1] + c[7] * species[P1] * dif[7][TALA_KRAB];
//fjj[7][6] = c[7] * species[TALA_KRAB] * dif[6][P1] + c[7] * species[P1] * dif[6][TALA_KRAB];
//fjj[7][8] = c[7] * species[TALA_KRAB] * dif[8][P1] + c[7] * species[P1] * dif[8][TALA_KRAB];
//fjj[7][11] = c[7] * species[TALA_KRAB] * dif[11][P1] + c[7] * species[P1] * dif[11][TALA_KRAB];
//fjj[7][12] = c[7] * species[TALA_KRAB] * dif[12][P1] + c[7] * species[P1] * dif[12][TALA_KRAB];
//fjj[7][25] = c[7] * species[TALA_KRAB] * dif[25][P1] + c[7] * species[P1] * dif[25][TALA_KRAB];
//fjj[7][26] = c[7] * species[TALA_KRAB] * dif[26][P1] + c[7] * species[P1] * dif[26][TALA_KRAB];
//fjj[7][39] = c[7] * species[TALA_KRAB] * dif[39][P1] + c[7] * species[P1] * dif[39][TALA_KRAB];

c[8] = a_1;
reactants[8][P1_TALA_KRAB] = 1;
//--------------------------//
products[8][P1] = 1;
products[8][TALA_KRAB] = 1;
#define W8 w[8] = c[8] * species[P1_TALA_KRAB];
//fjj[8][6] = c[8] * dif[6][P1_TALA_KRAB];
//fjj[8][7] = c[8] * dif[7][P1_TALA_KRAB];
//fjj[8][8] = c[8] * dif[8][P1_TALA_KRAB];
//fjj[8][9] = c[8] * dif[9][P1_TALA_KRAB];

c[9] = d1;
reactants[9][P1_TALA_KRAB] = 1;
//--------------------------//
products[9][P1] = 1;
#define W9 w[9] = c[9] * species[P1_TALA_KRAB];
//fjj[9][6] = c[9] * dif[6][P1_TALA_KRAB];
//fjj[9][7] = c[9] * dif[7][P1_TALA_KRAB];
//fjj[9][8] = c[9] * dif[8][P1_TALA_KRAB];
//fjj[9][9] = c[9] * dif[9][P1_TALA_KRAB];



/*P2*/



c[10] = k1;
reactants[10][P2_TALB_VP16] = 1;
//--------------------------//
products[10][P2_TALB_VP16] = 1;
products[10][TALA_KRAB] = 1;
products[10][TALB_VP16] = 1;
products[10][mCITRINE] = 1;
#define W10 w[10] = c[10] * species[P2_TALB_VP16];
//fjj[10][13] = c[10] * dif[13][P2_TALB_VP16];
//fjj[10][14] = c[10] * dif[14][P2_TALB_VP16];
//fjj[10][15] = c[10] * dif[15][P2_TALB_VP16];
//fjj[10][16] = c[10] * dif[16][P2_TALB_VP16];




c[11] = b1;
reactants[11][P2] = 1;
//--------------------------//
products[11][P2] = 1;
products[11][TALA_KRAB] = 1;
products[11][TALB_VP16] = 1;
products[11][mCITRINE] = 1;
#define W11 w[11] = c[11] * species[P2];
//fjj[11][13] = c[11] * dif[13][P2];
//fjj[11][14] = c[11] * dif[14][P2];
//fjj[11][15] = c[11] * dif[15][P2];
//fjj[11][17] = c[11] * dif[17][P2];
//fjj[11][18] = c[11] * dif[18][P2];
//fjj[11][19] = c[11] * dif[19][P2];



c[12] = 0.01*b1;
reactants[12][P2_TALB_KRAB] = 1;
//--------------------------//
products[12][P2_TALB_KRAB] = 1;
products[12][TALA_KRAB] = 1;
products[12][TALB_VP16] = 1;
products[12][mCITRINE] = 1;
#define W12 w[12] = c[12] * species[P2_TALB_KRAB];
//fjj[12][16] = c[12] * dif[16][P2_TALB_KRAB];
//fjj[12][17] = c[12] * dif[17][P2_TALB_KRAB];
//fjj[12][18] = c[12] * dif[18][P2_TALB_KRAB];
//fjj[12][19] = c[12] * dif[19][P2_TALB_KRAB];


c[13] = a1;
reactants[13][P2] = 1;
reactants[13][TALB_VP16] = 1;
//--------------------------//
products[13][P2_TALB_VP16] = 1;
#define W13 w[13] = c[13] * species[P2]*species[TALB_VP16];
//fjj[13][13] = c[13] * species[TALB_VP16] * dif[13][P2] + c[13] * species[P2] * dif[13][TALB_VP16];
//fjj[13][14] = c[13] * species[TALB_VP16] * dif[14][P2] + c[13] * species[P2] * dif[14][TALB_VP16];
//fjj[13][15] = c[13] * species[TALB_VP16] * dif[15][P2] + c[13] * species[P2] * dif[15][TALB_VP16];
//fjj[13][17] = c[13] * species[TALB_VP16] * dif[17][P2] + c[13] * species[P2] * dif[17][TALB_VP16];
//fjj[13][18] = c[13] * species[TALB_VP16] * dif[18][P2] + c[13] * species[P2] * dif[18][TALB_VP16];
//fjj[13][19] = c[13] * species[TALB_VP16] * dif[19][P2] + c[13] * species[P2] * dif[19][TALB_VP16];
//fjj[13][10] = c[13] * species[TALB_VP16] * dif[10][P2] + c[13] * species[P2] * dif[10][TALB_VP16];
//fjj[13][11] = c[13] * species[TALB_VP16] * dif[11][P2] + c[13] * species[P2] * dif[11][TALB_VP16];
//fjj[13][12] = c[13] * species[TALB_VP16] * dif[12][P2] + c[13] * species[P2] * dif[12][TALB_VP16];
//fjj[13][25] = c[13] * species[TALB_VP16] * dif[25][P2] + c[13] * species[P2] * dif[25][TALB_VP16];
//fjj[13][26] = c[13] * species[TALB_VP16] * dif[26][P2] + c[13] * species[P2] * dif[26][TALB_VP16];
//fjj[13][42] = c[13] * species[TALB_VP16] * dif[42][P2] + c[13] * species[P2] * dif[42][TALB_VP16];

c[14] = a_1;
reactants[14][P2_TALB_VP16] = 1;
//--------------------------//
products[14][P2] = 1;
products[14][TALB_VP16] = 1;
#define W14 w[14] = c[14] * species[P2_TALB_VP16];
//fjj[14][13] = c[14] * dif[13][P2_TALB_VP16];
//fjj[14][14] = c[14] * dif[14][P2_TALB_VP16];
//fjj[14][15] = c[14] * dif[15][P2_TALB_VP16];
//fjj[14][16] = c[14] * dif[16][P2_TALB_VP16];

c[15] = d1;
reactants[15][P2_TALB_VP16] = 1;
//--------------------------//
products[15][P2] = 1;
#define W15 w[15] = c[15] * species[P2_TALB_VP16];
//fjj[15][13] = c[15] * dif[13][P2_TALB_VP16];
//fjj[15][14] = c[15] * dif[14][P2_TALB_VP16];
//fjj[15][15] = c[15] * dif[15][P2_TALB_VP16];
//fjj[15][16] = c[15] * dif[16][P2_TALB_VP16];



c[16] = a1;
reactants[16][P2_TALB_VP16] = 1;
reactants[16][TALB_KRAB] = 1;
//--------------------------//
products[16][P2_TALB_KRAB] = 1;
//NAPAKA! #define W16 w[16] = c[16] * species[P2_TALB_VP16];
#define W16 w[16] = c[16] * species[P2_TALB_VP16] * species[TALB_KRAB];
//fjj[16][13] = c[16] * species[TALB_KRAB] * dif[13][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[13][TALB_KRAB];
//fjj[16][14] = c[16] * species[TALB_KRAB] * dif[14][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[14][TALB_KRAB];
//fjj[16][15] = c[16] * species[TALB_KRAB] * dif[15][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[15][TALB_KRAB];
//fjj[16][16] = c[16] * species[TALB_KRAB] * dif[16][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[16][TALB_KRAB];
//fjj[16][0] = c[16] * species[TALB_KRAB] * dif[0][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[0][TALB_KRAB];
//fjj[16][1] = c[16] * species[TALB_KRAB] * dif[1][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[1][TALB_KRAB];
//fjj[16][2] = c[16] * species[TALB_KRAB] * dif[2][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[2][TALB_KRAB];
//fjj[16][16] = c[16] * species[TALB_KRAB] * dif[16][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[16][TALB_KRAB];
//fjj[16][17] = c[16] * species[TALB_KRAB] * dif[17][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[17][TALB_KRAB];
//fjj[16][18] = c[16] * species[TALB_KRAB] * dif[18][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[18][TALB_KRAB];
//fjj[16][20] = c[16] * species[TALB_KRAB] * dif[20][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[20][TALB_KRAB];
//fjj[16][21] = c[16] * species[TALB_KRAB] * dif[21][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[21][TALB_KRAB];
//fjj[16][41] = c[16] * species[TALB_KRAB] * dif[41][P2_TALB_VP16] + c[16] * species[P2_TALB_VP16] * dif[40][TALB_KRAB];




c[17] = a1;
reactants[17][P2] = 1;
reactants[17][TALB_KRAB] = 1;
//--------------------------//
products[17][P2_TALB_KRAB] = 1;
#define W17 w[17] = c[17] * species[P2] * species[TALB_KRAB];
//fjj[17][13] = c[17] * species[TALB_KRAB] * dif[13][P2] + c[17] * species[P2] * dif[13][TALB_KRAB];
//fjj[17][14] = c[17] * species[TALB_KRAB] * dif[14][P2] + c[17] * species[P2] * dif[14][TALB_KRAB];
//fjj[17][15] = c[17] * species[TALB_KRAB] * dif[15][P2] + c[17] * species[P2] * dif[15][TALB_KRAB];
//fjj[17][19] = c[17] * species[TALB_KRAB] * dif[19][P2] + c[17] * species[P2] * dif[19][TALB_KRAB];
//fjj[17][0] = c[17] * species[TALB_KRAB] * dif[0][P2] + c[17] * species[P2] * dif[0][TALB_KRAB];
//fjj[17][1] = c[17] * species[TALB_KRAB] * dif[1][P2] + c[17] * species[P2] * dif[1][TALB_KRAB];
//fjj[17][2] = c[17] * species[TALB_KRAB] * dif[2][P2] + c[17] * species[P2] * dif[2][TALB_KRAB];
//fjj[17][16] = c[17] * species[TALB_KRAB] * dif[16][P2] + c[17] * species[P2] * dif[16][TALB_KRAB];
//fjj[17][17] = c[17] * species[TALB_KRAB] * dif[17][P2] + c[17] * species[P2] * dif[17][TALB_KRAB];
//fjj[17][18] = c[17] * species[TALB_KRAB] * dif[18][P2] + c[17] * species[P2] * dif[18][TALB_KRAB];
//fjj[17][20] = c[17] * species[TALB_KRAB] * dif[20][P2] + c[17] * species[P2] * dif[20][TALB_KRAB];
//fjj[17][21] = c[17] * species[TALB_KRAB] * dif[21][P2] + c[17] * species[P2] * dif[21][TALB_KRAB];
//fjj[17][41] = c[17] * species[TALB_KRAB] * dif[41][P2] + c[17] * species[P2] * dif[41][TALB_KRAB];

c[18] = a_1;
reactants[18][P2_TALB_KRAB] = 1;
//--------------------------//
products[18][P2] = 1;
products[18][TALB_KRAB] = 1;
#define W18 w[18] = c[18] * species[P2_TALB_KRAB];
//fjj[18][16] = c[18] * dif[16][P2_TALB_KRAB];
//fjj[18][17] = c[18] * dif[17][P2_TALB_KRAB];
//fjj[18][18] = c[18] * dif[18][P2_TALB_KRAB];
//fjj[18][19] = c[18] * dif[19][P2_TALB_KRAB];



c[19] = d1;
reactants[19][P2_TALB_KRAB] = 1;
//--------------------------//
products[19][P2] = 1;
#define W19 w[19] = c[19] * species[P2_TALB_KRAB];
//fjj[19][16] = c[19] * dif[16][P2_TALB_KRAB];
//fjj[19][17] = c[19] * dif[17][P2_TALB_KRAB];
//fjj[19][18] = c[19] * dif[18][P2_TALB_KRAB];
//fjj[19][19] = c[19] * dif[19][P2_TALB_KRAB];



/*P3*/

c[20] = g1;
reactants[20][P3] = 1;
//--------------------------//
products[20][P3] = 1;
products[20][TALB_KRAB] = 1;
products[20][TALA_VP16] = 1;
#define W20 w[20] = c[20] * species[P3];
//fjj[20][22] = c[20] * dif[22][P3];
//fjj[20][23] = c[20] * dif[24][P3];
//fjj[20][24] = c[20] * dif[24][P3];


c[21] = b1;
reactants[21][P3_PIP_KRAB] = 1;
//--------------------------//
products[21][P3_PIP_KRAB] = 1;
products[21][TALB_KRAB] = 1;
products[21][TALA_VP16] = 1;
#define W21 w[21] = c[21] * species[P3_PIP_KRAB];
//fjj[21][22] = c[21] * dif[22][P3_PIP_KRAB];
//fjj[21][23] = c[21] * dif[24][P3_PIP_KRAB];
//fjj[21][24] = c[21] * dif[23][P3_PIP_KRAB];
//fjj[21][45] = c[21] * dif[45][P3_PIP_KRAB];




c[22] = a1;
reactants[22][P3] = 1;
reactants[22][PIP_KRAB] = 1;
//--------------------------//
products[22][P3_PIP_KRAB] = 1;
//NAPAKA #define W22 w[22] = c[22] * species[P3];
#define W22 w[22] = c[22] * species[P3] * species[PIP_KRAB];
//fjj[22][22] = c[22] * species[PIP_KRAB] * dif[22][P3] + c[22] * species[P3] * dif[22][PIP_KRAB];
//fjj[22][23] = c[22] * species[PIP_KRAB] * dif[23][P3] + c[22] * species[P3] * dif[23][PIP_KRAB];
//fjj[22][24] = c[22] * species[PIP_KRAB] * dif[24][P3] + c[22] * species[P3] * dif[24][PIP_KRAB];
//fjj[22][30] = c[22] * species[PIP_KRAB] * dif[30][P3] + c[22] * species[P3] * dif[30][PIP_KRAB];
//fjj[22][31] = c[22] * species[PIP_KRAB] * dif[31][P3] + c[22] * species[P3] * dif[31][PIP_KRAB];
//fjj[22][32] = c[22] * species[PIP_KRAB] * dif[32][P3] + c[22] * species[P3] * dif[32][PIP_KRAB];
//fjj[22][43] = c[22] * species[PIP_KRAB] * dif[43][P3] + c[22] * species[P3] * dif[43][PIP_KRAB];


c[23] = a_1;
reactants[23][P3_PIP_KRAB] = 1;
//--------------------------//
products[23][P3] = 1;
products[23][PIP_KRAB] = 1;
#define W23 w[23] = c[23] * species[P3_PIP_KRAB];
//fjj[23][22] = c[23] * dif[22][P3_PIP_KRAB];
//fjj[23][23] = c[23] * dif[23][P3_PIP_KRAB];
//fjj[23][24] = c[23] * dif[24][P3_PIP_KRAB];


c[24] = d1;
reactants[24][P3_PIP_KRAB] = 1;
//--------------------------//
products[24][P3] = 1;
#define W24 w[24] = c[24] * species[P3_PIP_KRAB];
//fjj[24][22] = c[24] * dif[22][P3_PIP_KRAB];
//fjj[24][23] = c[24] * dif[23][P3_PIP_KRAB];
//fjj[24][24] = c[24] * dif[24][P3_PIP_KRAB];



c[25] = g1;
reactants[25][P4] = 1;
//--------------------------//
products[25][P4] = 1;
products[25][TALA_KRAB] = 1;
products[25][TALB_VP16] = 1;
#define W25 w[25] = c[25] * species[P4];
//fjj[25][27] = c[25] * dif[27][P4];
//fjj[25][28] = c[25] * dif[28][P4];
//fjj[25][29] = c[25] * dif[29][P4];

c[26] = b1;
reactants[26][P4_E_KRAB] = 1;
//--------------------------//
products[26][P4_E_KRAB] = 1;
products[26][TALA_KRAB] = 1;
products[26][TALB_VP16] = 1;
#define W26 w[26] = c[26] * species[P4_E_KRAB];
//fjj[26][27] = c[26] * dif[27][P4_E_KRAB];
//fjj[26][28] = c[26] * dif[28][P4_E_KRAB];
//fjj[26][29] = c[26] * dif[29][P4_E_KRAB];
//fjj[26][46] = c[26] * dif[46][P4_E_KRAB];

c[27] = a1;
reactants[27][P4] = 1;
reactants[27][E_KRAB] = 1;
//--------------------------//
products[27][P4_E_KRAB] = 1;
#define W27 w[27] = c[27] * species[P4] * species[E_KRAB];
//fjj[27][27] = c[27] * species[E_KRAB] * dif[27][P4] + c[27] * species[P4] * dif[27][E_KRAB];
//fjj[27][28] = c[27] * species[E_KRAB] * dif[28][P4] + c[27] * species[P4] * dif[28][E_KRAB];
//fjj[27][29] = c[27] * species[E_KRAB] * dif[29][P4] + c[27] * species[P4] * dif[29][E_KRAB];
//fjj[27][30] = c[27] * species[E_KRAB] * dif[30][P4] + c[27] * species[P4] * dif[30][E_KRAB];
//fjj[27][34] = c[27] * species[E_KRAB] * dif[34][P4] + c[27] * species[P4] * dif[34][E_KRAB];
//fjj[27][35] = c[27] * species[E_KRAB] * dif[35][P4] + c[27] * species[P4] * dif[35][E_KRAB];
//fjj[27][44] = c[27] * species[E_KRAB] * dif[44][P4] + c[27] * species[P4] * dif[44][E_KRAB];

c[28] = a_1;
reactants[28][P4_E_KRAB] = 1;
//--------------------------//
products[28][P4] = 1;
products[28][E_KRAB] = 1;
#define W28 w[28] = c[28] * species[P4_E_KRAB];
//fjj[28][27] = c[28] * dif[27][P4_E_KRAB];
//fjj[28][28] = c[28] * dif[28][P4_E_KRAB];
//fjj[28][29] = c[28] * dif[29][P4_E_KRAB];
//fjj[28][46] = c[28] * dif[46][P4_E_KRAB];

c[29] = d1;
reactants[29][P4_E_KRAB] = 1;
//--------------------------//
products[29][P4] = 1;
#define W29 w[29] = c[29] * species[P4_E_KRAB];
//fjj[29][27] = c[29] * dif[27][P4_E_KRAB];
//fjj[29][28] = c[29] * dif[28][P4_E_KRAB];
//fjj[29][29] = c[29] * dif[29][P4_E_KRAB];
//fjj[29][46] = c[29] * dif[46][P4_E_KRAB];


/*P5*/
c[30] = g1;
reactants[30][P5] = 1;
//--------------------------//
products[30][P5] = 1;
products[30][PIP_KRAB] = 1;
products[30][E_KRAB] = 1;
#define W30 w[30] = c[30] * species[P5];


/*Inducer system*/
c[31] = a1;
reactants[31][iPC] = 1;
reactants[31][PIP_KRAB] = 1;
//--------------------------//
products[31][iPC_PIP_KRAB] = 1;
//NAPAKA #define W31 w[31] = c[31] * species[iPC];
#define W31 w[31] = c[31] * species[iPC] * species[PIP_KRAB];
//fjj[31][31] = c[31] * species[PIP_KRAB] * dif[31][iPC] + c[31] * species[iPC] * dif[31][PIP_KRAB];
//fjj[31][32] = c[31] * species[PIP_KRAB] * dif[32][iPC] + c[31] * species[iPC] * dif[32][PIP_KRAB];
//fjj[31][33] = c[31] * species[PIP_KRAB] * dif[33][iPC] + c[31] * species[iPC] * dif[33][PIP_KRAB];
//fjj[31][45] = c[31] * species[PIP_KRAB] * dif[45][iPC] + c[31] * species[iPC] * dif[45][PIP_KRAB];
//fjj[31][22] = c[31] * species[PIP_KRAB] * dif[22][iPC] + c[31] * species[iPC] * dif[22][PIP_KRAB];
//fjj[31][23] = c[31] * species[PIP_KRAB] * dif[23][iPC] + c[31] * species[iPC] * dif[23][PIP_KRAB];
//fjj[31][30] = c[31] * species[PIP_KRAB] * dif[30][iPC] + c[31] * species[iPC] * dif[30][PIP_KRAB];


c[32] = a_1;
reactants[32][iPC_PIP_KRAB] = 1;
//--------------------------//
products[32][iPC] = 1;
products[32][PIP_KRAB] = 1;
#define W32 w[32] = c[32] * species[iPC_PIP_KRAB];
//fjj[32][31] = c[32] * dif[31][iPC_PIP_KRAB];
//fjj[32][32] = c[32] * dif[32][iPC_PIP_KRAB];
//fjj[32][33] = c[32] * dif[33][iPC_PIP_KRAB];
//fjj[32][45] = c[32] * dif[45][iPC_PIP_KRAB];


c[33] = d1;
reactants[33][iPC_PIP_KRAB] = 1;
//--------------------------//
products[33][iPC] = 1;
#define W33 w[33] = c[33] * species[iPC_PIP_KRAB];
//fjj[33][31] = c[33] * dif[31][iPC_PIP_KRAB];
//fjj[33][32] = c[33] * dif[32][iPC_PIP_KRAB];
//fjj[33][33] = c[33] * dif[33][iPC_PIP_KRAB];
//fjj[33][45] = c[33] * dif[45][iPC_PIP_KRAB];


c[34] = a1;
reactants[34][iEC] = 1;
reactants[34][E_KRAB] = 1;
//--------------------------//
products[34][iEC_E_KRAB] = 1;
#define W34 w[34] = c[34] * species[iEC] * species[E_KRAB];
//fjj[34][34] = c[34] * species[E_KRAB] * dif[34][iEC] + c[31] * species[iEC] * dif[34][E_KRAB];
//fjj[34][35] = c[34] * species[E_KRAB] * dif[35][iEC] + c[31] * species[iEC] * dif[35][E_KRAB];
//fjj[34][36] = c[34] * species[E_KRAB] * dif[36][iEC] + c[31] * species[iEC] * dif[36][E_KRAB];
//fjj[34][46] = c[34] * species[E_KRAB] * dif[46][iEC] + c[31] * species[iEC] * dif[46][E_KRAB];
//fjj[34][27] = c[34] * species[E_KRAB] * dif[27][iEC] + c[31] * species[iEC] * dif[27][E_KRAB];
//fjj[34][28] = c[34] * species[E_KRAB] * dif[28][iEC] + c[31] * species[iEC] * dif[28][E_KRAB];
//fjj[34][30] = c[34] * species[E_KRAB] * dif[30][iEC] + c[31] * species[iEC] * dif[30][E_KRAB];


c[35] = a_1;
reactants[35][iEC_E_KRAB] = 1;
//--------------------------//
products[35][iEC] = 1;
products[35][E_KRAB] = 1;
#define W35 w[35] = c[35] * species[iEC_E_KRAB];
//fjj[35][34] = c[35] * dif[34][iEC_E_KRAB];
//fjj[35][35] = c[35] * dif[35][iEC_E_KRAB];
//fjj[35][36] = c[35] * dif[36][iEC_E_KRAB];
//fjj[35][45] = c[35] * dif[45][iEC_E_KRAB];

c[36] = d1;
reactants[36][iEC_E_KRAB] = 1;
//--------------------------//
products[36][iEC] = 1;
#define W36 w[36] = c[36] * species[iEC_E_KRAB];
//fjj[36][34] = c[36] * dif[34][iEC_E_KRAB];
//fjj[36][35] = c[36] * dif[35][iEC_E_KRAB];
//fjj[36][36] = c[36] * dif[36][iEC_E_KRAB];
//fjj[36][45] = c[36] * dif[45][iEC_E_KRAB];


/*Degradation*/;

c[37] = d1;
reactants[37][BFP] = 1;
//--------------------------//
#define W37 w[37] = c[37] * species[BFP];
//fjj[37][0] = c[37] * dif[0][BFP];
//fjj[37][1] = c[37] * dif[1][BFP];
//fjj[37][2] = c[37] * dif[2][BFP];
//fjj[37][37] = c[37] * dif[37][BFP];



c[38] = d1;
reactants[38][mCITRINE] = 1;
//--------------------------//
#define W38 w[38] = c[38] * species[mCITRINE];
//fjj[38][10] = c[38] * dif[10][mCITRINE];
//fjj[38][11] = c[38] * dif[11][mCITRINE];
//fjj[38][12] = c[38] * dif[12][mCITRINE];
//fjj[38][38] = c[38] * dif[38][mCITRINE];

c[39] = d1;
reactants[39][TALA_KRAB] = 1;
//--------------------------//
#define W39 w[39] = c[39] * species[TALA_KRAB];
//fjj[39][6] = c[39] * dif[6][TALA_KRAB];
//fjj[39][7] = c[39] * dif[7][TALA_KRAB];
//fjj[39][8] = c[39] * dif[8][TALA_KRAB];
//fjj[39][10] = c[39] * dif[10][TALA_KRAB];
//fjj[39][11] = c[39] * dif[11][TALA_KRAB];
//fjj[39][12] = c[39] * dif[12][TALA_KRAB];
//fjj[39][25] = c[39] * dif[25][TALA_KRAB];
//fjj[39][26] = c[39] * dif[26][TALA_KRAB];
//fjj[39][39] = c[39] * dif[39][TALA_KRAB];


c[40] = d1;
reactants[40][TALA_VP16] = 1;
//--------------------------//
#define W40 w[40] = c[40] * species[TALA_VP16];
//fjj[40][0] = c[40] * dif[0][TALA_VP16];
//fjj[40][1] = c[40] * dif[1][TALA_VP16];
//fjj[40][2] = c[40] * dif[2][TALA_VP16];
//fjj[40][3] = c[40] * dif[3][TALA_VP16];
//fjj[40][4] = c[40] * dif[4][TALA_VP16];
//fjj[40][20] = c[40] * dif[20][TALA_VP16];
//fjj[40][21] = c[40] * dif[21][TALA_VP16];
//fjj[40][41] = c[40] * dif[41][TALA_VP16];

c[41] = d1;
reactants[41][TALB_KRAB] = 1;
//--------------------------//
#define W41 w[41] = c[41] * species[TALB_KRAB];
//fjj[41][0] = c[41] * dif[0][TALB_KRAB];
//fjj[41][1] = c[41] * dif[1][TALB_KRAB];
//fjj[41][2] = c[41] * dif[2][TALB_KRAB];
//fjj[41][16] = c[41] * dif[16][TALB_KRAB];
//fjj[41][17] = c[41] * dif[17][TALB_KRAB];
//fjj[41][18] = c[41] * dif[18][TALB_KRAB];
//fjj[41][20] = c[41] * dif[20][TALB_KRAB];
//fjj[41][21] = c[41] * dif[21][TALB_KRAB];
//fjj[41][41] = c[41] * dif[41][TALB_KRAB];

c[42] = d1;
reactants[42][TALB_VP16] = 1;
//--------------------------//
#define W42 w[42] = c[42] * species[TALB_VP16];
//fjj[42][10] = c[42] * dif[10][TALB_VP16];
//fjj[42][11] = c[42] * dif[11][TALB_VP16];
//fjj[42][12] = c[42] * dif[12][TALB_VP16];
//fjj[42][13] = c[42] * dif[13][TALB_VP16];
//fjj[42][14] = c[42] * dif[14][TALB_VP16];
//fjj[42][25] = c[42] * dif[25][TALB_VP16];
//fjj[42][26] = c[42] * dif[26][TALB_VP16];
//fjj[42][42] = c[42] * dif[42][TALB_VP16];



c[43] = d1;
reactants[43][PIP_KRAB] = 1;
//--------------------------//
#define W43 w[43] = c[43] * species[PIP_KRAB];
//fjj[43][22] = c[43] * dif[22][PIP_KRAB];
//fjj[43][23] = c[43] * dif[23][PIP_KRAB];
//fjj[43][30] = c[43] * dif[30][PIP_KRAB];
//fjj[43][31] = c[43] * dif[31][PIP_KRAB];
//fjj[43][32] = c[43] * dif[32][PIP_KRAB];
//fjj[43][43] = c[43] * dif[43][PIP_KRAB];


c[44] = d1;
reactants[44][E_KRAB] = 1;
//--------------------------//
#define W44 w[44] = c[44] * species[E_KRAB];
//fjj[44][27] = c[44] * dif[27][E_KRAB];
//fjj[44][28] = c[44] * dif[28][E_KRAB];
//fjj[44][30] = c[44] * dif[30][E_KRAB];
//fjj[44][34] = c[44] * dif[34][E_KRAB];
//fjj[44][35] = c[44] * dif[35][E_KRAB];
//fjj[44][44] = c[44] * dif[44][E_KRAB];



/*Inducer system*/

c[45] = a1;
reactants[45][P3_PIP_KRAB] = 1;
reactants[45][iPC] = 1;
//--------------------------//
products[45][P3] = 1;
products[45][iPC_PIP_KRAB] = 1;
#define W45 w[45] = c[45] * species[P3_PIP_KRAB] * species[iPC];

//fjj[45][22] = c[45] * species[iPC] * dif[22][P3_PIP_KRAB] + c[45] * species[P3_PIP_KRAB] * dif[22][iPC];
//fjj[45][23] = c[45] * species[iPC] * dif[23][P3_PIP_KRAB] + c[45] * species[P3_PIP_KRAB] * dif[23][iPC];
//fjj[45][24] = c[45] * species[iPC] * dif[24][P3_PIP_KRAB] + c[45] * species[P3_PIP_KRAB] * dif[24][iPC];
//fjj[45][31] = c[45] * species[iPC] * dif[31][P3_PIP_KRAB] + c[45] * species[P3_PIP_KRAB] * dif[31][iPC];
//fjj[45][32] = c[45] * species[iPC] * dif[32][P3_PIP_KRAB] + c[45] * species[P3_PIP_KRAB] * dif[32][iPC];
//fjj[45][33] = c[45] * species[iPC] * dif[33][P3_PIP_KRAB] + c[45] * species[P3_PIP_KRAB] * dif[33][iPC];
//fjj[45][45] = c[45] * species[iPC] * dif[45][P3_PIP_KRAB] + c[45] * species[P3_PIP_KRAB] * dif[45][iPC];




c[46] = a1;
reactants[46][P4_E_KRAB] = 1;
reactants[46][iEC] = 1;
//--------------------------//
products[46][P4] = 1;
products[46][iEC_E_KRAB] = 1;
#define W46 w[46] = c[46] * species[P4_E_KRAB] * species[iEC];
//fjj[46][27] = c[46] * species[iEC] * dif[27][P4_E_KRAB] + c[46] * species[P4_E_KRAB] * dif[27][iEC];
//fjj[46][28] = c[46] * species[iEC] * dif[28][P4_E_KRAB] + c[46] * species[P4_E_KRAB] * dif[28][iEC];
//fjj[46][29] = c[46] * species[iEC] * dif[29][P4_E_KRAB] + c[46] * species[P4_E_KRAB] * dif[29][iEC];
//fjj[46][34] = c[46] * species[iEC] * dif[34][P4_E_KRAB] + c[46] * species[P4_E_KRAB] * dif[34][iEC];
//fjj[46][35] = c[46] * species[iEC] * dif[35][P4_E_KRAB] + c[46] * species[P4_E_KRAB] * dif[35][iEC];
//fjj[46][36] = c[46] * species[iEC] * dif[36][P4_E_KRAB] + c[46] * species[P4_E_KRAB] * dif[36][iEC];
//fjj[46][46] = c[46] * species[iEC] * dif[46][P4_E_KRAB] + c[46] * species[P4_E_KRAB] * dif[46][iEC];
